---
id: "loc-of"
keywords: ["loc of"]
name: "__LOC_OF__"
summary: "This is the `__LOC_OF__` special value."
category: "specialvalues"
---

`__LOC_OF__(expression)` returns a tuple consisting of `(location, expression)` corresponding to the location of the expression you pass as a parameter here.

**Note**: `expression` refers to any expression, it does not need to be a function.

<CodeTab labels={["ReScript", "JS Output"]}>

```res example
let f = () => None
let (loc, f') = __LOC_OF__(f)

loc->Console.log
f'->Console.log
```

```js
function f() {}

var loc = 'File "testmodule.res", line 2, characters 27-28';

console.log(loc);
console.log(f);
var f$p = f;
```

</CodeTab>
